from typing import Optional

from fastapi_amis_admin.models import Field
from pydantic import BaseModel


class SecurityUser(BaseModel):
    id: Optional[int] = Field(default=0,  title='id')
    username: Optional[str] = Field(nullable=False, title='用户名')
    password: Optional[str] = Field(title='密码')
    realName: Optional[str] = Field(title='姓名')
    headUrl: Optional[str] = Field(title='头像')
    superAdmin: Optional[int] = Field(title='超级管理员', description="超级管理员   0：否   1：是")
    status: Optional[int] = Field(title='状态', description="状态  0：停用   1：正常")
    depts: Optional[list] = Field(title='权限字符串集合')
    roles: Optional[list] = Field(title='权限字符串集合')
    principals: Optional[list] = Field(title='权限字符串集合')
